<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>充值记录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/common.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
	</head>

	<body>

		<style>
			[v-cloak] {
				display: none;
			}
			
			html,
			body {
				height: 100%;
				background-color: white;
			}
			
			.mui-bar-nav {
				background: #f16456;
				height: 58px;
			}
			
			.mui-bar .mui-title {
				margin-top: 18px;
			}
			
			.mui-bar-nav~.mui-content {
				padding-top: 58px;
			}
			
			.mui-action-back,
			.mui-title,
			.mui-action-back:active {
				color: #FFFFFF!important;
				margin-top: 17px;
			}
			
			.mui-content {
				height: 100%;
			}
			
			.mui-content>.mui-table-view:first-child {
				margin-top: 0px;
			}
			
			.mui-badge-danger {
				background-color: #F16456;
			}
			
			.mui-media-body .amount {
				float: right;
				padding: 8px 0px 0px;
				color: #f16456;
			}
		</style>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">充值记录</h1>
		</header>
		<div class="mui-content" id="bizVue" v-cloak>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in list">
					<div class="mui-media-body">
						{{item.description}}
						<span class="mui-badge mui-badge-primary" v-if="item.status == 0 || item.status == 1">已提交</span>
						<span class="mui-badge mui-badge-success" v-if="item.status == 2">成功</span>
						<span class="mui-badge mui-badge-red" v-if="item.status == 3 || item.status == 4">失败</span>
						<span class="amount"><span class="mui-badge mui-badge-danger">+{{item.amount}}</span></span>
						<h6>{{item.createTime}}</h6>
					</div>
				</li>
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/vue.min.js"></script>
		<script type="text/javascript" src="../js/public.js"></script>
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
		<script>
			mui.init({
				pullRefresh: {
					container: '#bizVue',
					up: {
						auto: true,
						contentrefresh: '正在加载...',
						callback: function() {
							vm.loadData();
						}
					}
				}
			});
			var vm = new Vue({
				el: '#bizVue',
				data: {
					list: [],
					page: 1
				},
				mounted: function() {
					mui.plusReady(function() {
						swipeBack();
					});
				},
				methods: {
					loadData: function() {
						mui.postParam(DepositList, {
							"page": vm.page,
							"limit": 20
						}, function(result) {
							if(result.code == 0) {
								vm.list = vm.list.concat(result.page.list);
								vm.page = result.page.currPage + 1;
								mui('#bizVue').pullRefresh().endPullupToRefresh((result.page.currPage >= result.page.totalPage));
							} else {
								mymui(result.msg);
							}
						});
					}
				}
			});
		</script>

	</body>

</html>